# Maintainer: a821 at mail de
# Contributor: PumpkinCheshire <me at pumpkincheshire dot com>

pkgname=python-xyzservices
_name=xyzservices
pkgver=2025.11.0
pkgrel=1
pkgdesc='Provides a repository of available XYZ services offering raster basemap tiles'
arch=('any')
url="https://github.com/geopandas/xyzservices"
license=('BSD-3-Clause')
depends=('python')
makedepends=(
  'python-setuptools-scm'
  'python-wheel'
  'python-build'
  'python-installer'
)
source=("$pkgname-$pkgver.tar.gz::$url/releases/download/$pkgver/$_name-$pkgver.tar.gz"
        "fix_warnings.patch")
b2sums=('6651bd3261d6baa238c351ece0f937a613f9c9bd1b8b946936d63ca87cc346941df265c8469016c63de6dc5505d8c6ea9b4ca97b8764e39801568309ff35ffec'
        'a19dfde31b1574c452ef4edc3abd441cb81ea9732f7ca6ef038a5b0ef9946325485e4ebd70d5a769f06e2a07bb5faea004f13cfb3a9b1c02945ba3679aec7afc')

prepare() {
  cd "$_name-$pkgver"
  patch -p1 < ../fix_warnings.patch
}

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --no-isolation
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
